Please create pipeline component for giving file as per your requirement as shown below code in execute method of IComponent interface:
string filename = (string)pInMsg.Context.Read("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties");
int lastindex = filename.LastIndexOf(@"\");
filename = filename.Substring(lastindex + 1);
bodyPart.PartProperties.Write("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", filename);
IBaseMessageFactory messageFactory = pContext.GetMessageFactory();
IBaseMessage newMessage = messageFactory.CreateMessage();
newMessage.Context = pInMsg.Context;
//creating new part
IBaseMessagePart attachmentPart = messageFactory.CreateMessagePart();
attachmentPart.Data = pInMsg.BodyPart.Data;
attachmentPart.Charset = pInMsg.BodyPart.Charset;
attachmentPart.ContentType = pInMsg.BodyPart.ContentType;
newMessage.AddPart(pInMsg.BodyPartName,pInMsg.BodyPart, false);
newMessage.AddPart("Attachment",attachmentPart, true);
And after that Make sure that you r adding your custom pipeline component after MIME Encoder component in Encode
stage of send pipeline. I hope this will help. Add both components in same stage but first add MIME Encoder and then your custom pipeline component.